Utility class helping with environment rendering such as cube maps or spherical maps. More...
Static Public Member Functions | |
static void | renderCubemap (nkGraphics::Texture *output, nkGraphics::Shader *shader, unsigned int targetDimensions, nkGraphics::FORMAT targetFormat) |
static void | cubemapToSphericalMap (nkGraphics::Texture *output, nkGraphics::Texture *input, unsigned int targetWidth, unsigned int targetHeight) |
Utility class helping with environment rendering such as cube maps or spherical maps.
|
static |
Renders the given shader, into a cube map. The shader will be used 6 times as a post processing pass with properly setup cameras to render each face. The resulting texture can then be used as an enviromnent map with other materials or effects.
output | The texture to render to, which will be setup and loaded automatically by the method. |
shader | The shader to use to render each face. |
targetDimensions | The target dimensions (width and height) the output texture will be setup with. |
targetFormat | The target format the output texture will be setup with. |
|
static |
Converts a cube map, into a single texture, spherical map.
output | The texture to render to, which will be setup and loaded automatically by the method. |
input | The input cube map to render. |
targetWidth | The target width for the output texture. |
targetHeight | The target height for the output texture. |